#!/usr/bin/sh

IMPORT_DATE=$(date +%Y%m%d)
if [ $# -eq 1 ]; then
    IMPORT_DATE=$1
fi

hive -e "load data infile '/user_clicks/${IMPORT_DATE}/clicklog.dat' into table user_clicks partition(dt='${IMPORT_DATE}')"
